#ifndef OPTION_HH_
# define OPTION_HH_

# include <string>


// more an ApplyOption class than an Option class...
// or even a callback fun list

// friend Context, ...
// 4 : alter OGL ctxt
class Option
{
  // TODO check syntax
  friend: class Context, class Game;

public:
  void setTitle(std::string);
  void setDescription(std::string);

  /// callback list (4 all : bool: effective change)

  /** change screen resolution, according to resolution
   ** resolution can take one of the following values:
   **   RESOLUTION_640x480
   **   RESOLUTION_1024x768
   **   ... add others ...
   **   ... cd add custom ...
   **   ... cd be nice if autodetect ...
   **   ... no dual screen support (till GLFW doesn't support it)
   **
   **   RESOLUTION_1920x1080
   */
  bool changeReolution(unsigned char resolution);

  bool changeRatio(float ratio); // alter Context OGL ratio => need to rebuild a context => is callback


  // __________ Graphics Params __________

  /** limits framerate accoring to \param framerate
   */
  bool fixFramerate(unsigned char framerate);

  /** enable / disable VSync, according to \param choice
   */
  bool enableVSync(bool choice);

  /** change language according to language
   ** \param language: can take one of the following value:
   **   LANGUAGE_ENGLISH
   **   LANGUAGE_FRENCH
   ** could add other languages ('simply' add column in DB)
   */
  bool changeLanguage(unsigned char language);

  /** change keyboard mapping
  ** must check all functions have been affected
  ** send a warning if false
  ** need to store a default config (DB || defines / enum)
  ** order: key list
  */
  bool changeKeyboard(char* keyList);

  /** your charater can have a headache, but you don't need to get one too...
  **
  */
  bool setBlurIntensity(unsigned char intensity);


  // __________ Misc Options __________

  /** disable / drop down character status output 'hungry, M-16: 5...'
  */
  bool setCharacterVerbosity(unsigned char level);

  /** enable / disable subtitles according to \param choice
   ** \param choice: true: enable subtitles; false: disable them
   */
  bool enableSubtitles(bool choice);

  /** moves the camera toward the enemy that hit you
   ** (if close from gun axe ?)
   */
  bool allowAutoHeadRotation(bool choice); // allow to set rotation speed ?

  /** is the player => character left-handed ?
   ** display main gun on left side
   ** switch mouse buttons (even when two guns)
   */
  bool leftHanded(bool choice);


  /** set mouse sensibility according to \param level
   */
  bool setMouseSensibility(unsigned char level);


private:
  std::string _title;
  std::string _description;
  Vector2 _coords;
  int _id;
};

#endif /* !OPTION_HH_ */
